home *** CD-ROM | disk | FTP | other *** search
- otclInterface Player {
-
- # The name of the player
- constructor {name}
-
- # The opponent player has challenged this player
- # expecting a new Game to be returned
- method challenge {opponent}
-
- method getName {}
- }
-
- otclImplementation Player {
-
- constructor {n} {} {
- set name $n
- PlayerServer playerAvailable $name $this
- }
-
- method challenge {opponent} {
- return [otclNew Game X $this]
- }
-
- method getName {} {
- return $name
- }
-
- attribute name
- }
-